package com.iis.hrms.persistence;

import javax.persistence.*;
import java.io.Serializable;

/**
 * The persistent class for the organizational_hierarchy database table.
 */
@Entity
@Table(name = "organizational_hierarchy")
@NamedQueries({
        @NamedQuery(name = "OrganizationalHierarchy.findAll", query = "SELECT o FROM OrganizationalHierarchy o"),
        @NamedQuery(name = "OrganizationalHierarchy.findById", query = "SELECT o FROM OrganizationalHierarchy o WHERE o.id = :id")})
public class OrganizationalHierarchy implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(unique = true, nullable = false)
    private String id;

    // bi-directional many-to-one association to Employee
    @ManyToOne
    @JoinColumn(name = "id_employee", nullable = false)
    private Employee employee1;

    // bi-directional many-to-one association to Employee
    @ManyToOne
    @JoinColumn(name = "id_manager", nullable = false)
    private Employee employee2;

    public OrganizationalHierarchy() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Employee getEmployee1() {
        return this.employee1;
    }

    public void setEmployee1(Employee employee1) {
        this.employee1 = employee1;
    }

    public Employee getEmployee2() {
        return this.employee2;
    }

    public void setEmployee2(Employee employee2) {
        this.employee2 = employee2;
    }

}